package com.example.demolistview;

import java.text.SimpleDateFormat;
import java.util.Date;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends Activity {
	TextView tv;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		// Set text to mark the test time.
				SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HH_mm_ss");
				String currentDateandTime = sdf.format(new Date());
				
				System.out.println("StartTimeAt: "+currentDateandTime);
				tv = (TextView) findViewById(R.id.tvStart);
				tv.setText(currentDateandTime);
	}

	public void onClickToShowListView(View v) {
		Intent intent = new Intent(MainActivity.this, ListViewActivity.class);
		startActivity(intent);
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
